home *** CD-ROM | disk | FTP | other *** search
/ Click - International Series 1 / Click Jigsaw Puzzles: Ken Duncan.iso / mac / puzzles / Stonehenge.dxr / 00232_sticky puzzlePlayerHelp button.ls < prev    next >
Encoding:
Text File  |  2002-11-11  |  1.9 KB  |  80 lines

  1. property spriteNum, pHelpOptionSelect
  2. global puzzPicFileURL, puzzShading, puzzleImageRect, puzzleTile, puzzpicrotation
  3.  
  4. on new me, spriteRef
  5.   if the paramCount = 1 then
  6.     nothing()
  7.   else
  8.     if the paramCount = 2 then
  9.       spriteNum = spriteRef.spriteNum
  10.     end if
  11.   end if
  12.   return me
  13. end
  14.  
  15. on mouseWithin me
  16.   pHelpOptionSelect = 0
  17.   if inside(theMouseLoc(), the rect of sprite 250) then
  18.     pHelpOptionSelect = ((the mouseV - 23) / 16) + 1
  19.     case pHelpOptionSelect of
  20.       1:
  21.         set the locV of sprite 251 to ((the mouseV - 23) / 16 * 16) + 29
  22.       3:
  23.         set the locV of sprite 251 to ((the mouseV - 23) / 16 * 16) + 29
  24.       4:
  25.         set the locV of sprite 251 to ((the mouseV - 23) / 16 * 16) + 29
  26.       5:
  27.         set the locV of sprite 251 to ((the mouseV - 23) / 16 * 16) + 29
  28.       6:
  29.         set the locV of sprite 251 to ((the mouseV - 23) / 16 * 16) + 29
  30.       7:
  31.         set the locV of sprite 251 to ((the mouseV - 23) / 16 * 16) + 29
  32.       otherwise:
  33.         pHelpOptionSelect = 0
  34.         set the locV of sprite 251 to -9999
  35.     end case
  36.     updateStage()
  37.   else
  38.     set the locV of sprite 251 to -9999
  39.     pHelpOptionSelect = 0
  40.     updateStage()
  41.   end if
  42. end
  43.  
  44. on mouseUp me
  45.   set the loc of sprite 250 to point(-9999, -9999)
  46.   set the locV of sprite 251 to -9999
  47.   updateStage()
  48.   if pHelpOptionSelect > 0 then
  49.     scrollTo = 0
  50.     case pHelpOptionSelect of
  51.       1:
  52.         scrollTo = 0
  53.       3:
  54.         scrollTo = 20
  55.       4:
  56.         scrollTo = 104
  57.       5:
  58.         scrollTo = 632
  59.       6:
  60.         scrollTo = 728
  61.       7:
  62.         scrollTo = 788
  63.     end case
  64.     scrollTo = scrollTo * the textHeight of member "help field" / 12
  65.     member("help field").scrollTop = scrollTo
  66.     helpDialog()
  67.   end if
  68. end
  69.  
  70. on mouseLeave me
  71.   set the mouseDownScript to "clearMenu(me)"
  72.   pHelpOptionSelect = 0
  73.   set the locV of sprite 251 to -9999
  74.   updateStage()
  75. end
  76.  
  77. on mouseEnter me
  78.   set the mouseDownScript to EMPTY
  79. end
  80.